//每当callplan日期改变，删除对应JointCall
trigger ChangeCallPlanDateDeleteJointCall on CallPlan__c (after update) {

    list<id> callPlanId=new list<id>();
    for(callplan__c cp:trigger.new){
        if(trigger.oldmap.get(cp.id).CallPlanDate__c!=cp.CallPlanDate__c){
            callplanid.add(cp.id);
        }
    }
    
    if(callplanid.size()>0){
        list<jointcall__c> jointCallList=[select id from jointCall__c where callPlan__c in: callplanid];
        if(jointcalllist.size()>0){
            delete jointcalllist;
        }
    }

}